package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/*
* 提供了一个 URL 是 /<application context>/dynamic-get 的资源
* 并且，这个资源只支持通过 GET 请求访问*/
@WebServlet("/dynamic-get")
public class DynamicGetServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("DynamicGetServlet 的 doGet 方法被执行");
    }
}
